﻿
@{
    Layout = null;
}
@model InternetClient2.Models.Jurisdiction
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <link href="~/Content/bootstrap.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <style>
        #body1 {
            background-image: url('../../Img/QQ图片20180221112331.png');
            background-size:100%;
        }
    </style>
    <script type="text/javascript"> 
        function denglu()
        {
          
            var JName = $("#txtJName").val();
            var Jpwd = $("#txtJpwd").val();
            var Jnamestr = '^[\u4e00-\u9fa5]+$';
            var Jpwdstr='^\d{15}|\d{}18$';
            if (JName == "" || JName == null)
            {
                alert("1");
                //$("#File1").val() = "用户名不能为空";
                $("#a").show();
            }
            else 
            {
                if (Jnamestr.test(JName)) 
                {
                    alert("2");
                    $("#a").hide();
                    $("#b").show();
                }
                else
                {
                    if(Jpwd==""||Jpwd==null)
                    {
                        alert("3");
                        $("#b").hide();
                        $("#c").show();
                    }
                    else
                    {
                        alert("4");
                        $("#c").hide();
                        {
                         
                            $.ajax({
                                type: "post",
                                url: "/Internet/manage",
                                data: { "JName": JName, "Jpwd": Jpwd },
                                dataType: "json",
                                success: function (date) {
                                    if (data == 2) {
                                        alert("经理");
                                    }
                                    else if (data == 1) {
                                        alert("网管");
                                    }
                                    else {

                                        alert("用户不存在");
                                    }
                                }
                            })
                        }
                    }
                }
            }
               


         
        }
    </script>
    <title>manage</title>
</head>
<body id="body1">
    <div id="div1"> 
       <table id="table1" width="400" height="100" align="center" style="text-align:center; margin-top:15%">
          <tr>
              <td>姓名</td>
              <td><input id="txtJName" type="text" /></td>
              <td id="a" style="display:none; color:#ff0000">姓名不能为空</td>
              <td id="b" style="display:none; color:#ff0000">姓名只能是汉字</td>
          </tr>
           <tr>
               <td>密码</td>
               <td><input id="txtJpwd" type="text" />
               
               </td>
               <td id="c" style="display:none;color:#ff0000">密码不能为空</td>
            
           </tr>
           <tr>
               <td colspan="2">
                   <input id="Button1" type="button" value="登录" onclick="denglu()" />
                   <a>注册？</a>
               <a  style="color:#ff0000">找回密码？</a>
                
               </td>
               
           </tr>
       </table>

    </div>
</body>
</html>
